<%--
  Created by IntelliJ IDEA.
  User: lzy
  Date: 2018/10/11
  Time: 8:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>hello world</title>
</head>
<body>
<h4>SpringMVC测试</h4>
<a href="springmvc/testRedirect">test redirect</a>
<br/><br/>
<a href="springmvc/testView">test view</a>
<br/><br>
<a href="springmvc/testViewAndViewResolver">test ViewAndViewResolver</a>
<hr/>
<%--
    模拟修改操作：
    1.原始数据为：1.tom，123456，tom@guigu.com,12
    2.密码不能被修改
    3.表单回显，模拟操作直接在表单填写对应的属性
--%>
<form action="springmvc/testModelAttribute" method="post">
    <input type="hidden" name="id" value="1">
    username:<input type="text" name="username" value="Tom"><br/>
    email:<input type="email" name="email" value="tom@123.com"><br/>
    age:<input type="text" name="age" value="12"><br/>
    <input type="submit" value="Submit">
</form>

<hr/>
<a href="springmvc/testSessionAttribute">test SessionAttribute</a>
<br/><br/>

<a href="springmvc/testMap">test Map</a>
<br/><br/>

<a href="springmvc/testModelAndView">test ModelAndView</a>
<br/><br/>

<a href="springmvc/testServletAPI">Test ServletAPI</a>
<br/><br/>

<form action="springmvc/testPOJO" method="post">
    username:<input type="text" name="username"/><br/>
    password:<input type="password" name="password"/><br/>
    email:<input type="email" name="email"/><br/>
    age:<input type="text" name="age"/><br/>
    province<input type="radio" name="address.province" value="Beijing">beijing<br/>
    <input type="radio" name="address.province" value="Shandong"/>shandong<br/>
    <input type="radio" name="address.province" value="Hebei"/>hebei<br/>
    <input type="submit" value="Submit"/>
</form>
<hr/>
<a href="springmvc/testCookieValue">Test Cookie value</a>
<br/><br/>
<a href="springmvc/testRequestHeader">Test Request header</a>
<br/><br/>
<a href="springmvc/testRequestParam?username=atguigu&age=11">Test request param</a>
<br/><br/>

<form action="springmvc/testRest/1" method="post">
    <input type="hidden" name="_method" value="PUT"/>
    <input type="submit" value="TestRest PUT"/>
</form>

<form action="springmvc/testRest/1" method="post">
    <input type="hidden" name="_method" value="DELETE"/>
    <input type="submit" value="TestRest DELETE"/>
</form>

<form action="springmvc/testRest" method="post">
    <input type="submit" value="TestRest POST"/>
</form>

<a href="springmvc/testRest/1">test rest get</a>

<br/>
<hr/>
<br/>

<a href="springmvc/testPathVariable/1">test path variable</a>
<br/><br/>
<a href="springmvc/testAntPath/aaa/abc">test ant path</a>
<br/><br/>
<a href="springmvc/testParamsAndHeaders?username=atguigu&age=11">test params and headers</a>
<br/><br/>
<form action="springmvc/testMethod" method="post">
    <input type="submit"/>
</form>
<a href="springmvc/testMethod">test method</a>
<br/><br/>
<a href="springmvc/testRequestMapping">requestMapping</a>
<br/><br/>
<a href="helloworld">hello world</a>
</body>
</html>
